package com.chen.entity;

import java.util.Random;

public class People {
    private String name;
    private Boolean gender;
    private Integer age;

    public People() {
        Random r = new Random();
        this.gender = r.nextBoolean();
        //int randomValue = (int)(Math.random() * (max - min + 1)) + min;
        this.age = (int)(Math.random()*(60-10+1))+10; // 10到60之间
    }
    public People(String name) {
        Random r = new Random();
        this.gender = r.nextBoolean();
        this.age = r.nextInt(60-10+1)+10;
        this.name=name;
    }


    public People(Boolean gender, Integer age) {
        this.gender = gender;
        this.age = age;
    }

    @Override
    public String toString() {
        return "People{" +
                "name='" + name + '\'' +
                ", gender=" + gender +
                ", age=" + age +
                '}';
    }

    public Boolean getGender() {
        return gender;
    }

    public void setGender(Boolean gender) {
        this.gender = gender;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }
}
